package com.football.service.Implement;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.football.dao.Interface.TeamDAO;
import com.football.model.League;
import com.football.model.Team;
import com.football.service.Interface.TeamService;

@Service
public class TeamServiceImpl implements TeamService {
	@Autowired
	private TeamDAO teamDAO;

	@Transactional
	public void addNewTeam(Team team) {
		teamDAO.addNewTeam(team);
	}

	@Transactional
	public void addTeamWithLeague(Team team, League league) {
		teamDAO.addTeamWithLeague(team, league);
	}

}
